<?php

/**
 * Description of PersonPersonClass
 *
 * @author adhamhelal
 */
class OrgInfoPanel extends Qpanel {
	protected $mctOrg;
        protected $mctAddress;
        protected $mctRecord;

        //Controls
        protected $lblOrgId;
        protected $lblOrgCreateBy;
	protected $lblOrgCreateDate;
	protected $lblOrgUpdateBy;
	protected $lblOrgUpdateDate;
        
        protected $lblAddressId;
        protected $lblAddressCreateBy;
	protected $lblAddressCreateDate;
	protected $lblAddressUpdateBy;
	protected $lblAddressUpdateDate;
        

            //Template
        protected $strTemplate;
        
       public function __construct($objParentObject, $mctOrg, $mctAddress, $strControlId = null) {
                // Call the Parent
                try {
                        parent::__construct($objParentObject, $strControlId);
                } catch (QCallerException $objExc) {
                        $objExc->IncrementOffset();
                        throw $objExc;
                }

                // Setup Template
                $this->strTemplate = __DOCROOT__.__PERSON__ .  '/tpl/qpanel.tpl.php';

                // Set the Person Meta Conrol
                $this->mctOrg = $mctOrg;
                $objOrg = $this->mctOrg->__get('Org');
                $this->mctRecord = RecordMetaControl::Create($this, $objOrg->__get("RecordId") );
                
                $this->lblOrgId = $this->mctOrg->lblId_Create();
                $this->lblOrgId->Name = QApplication::Translate("Organization: Id");
                $this->lblOrgId->SetParentControl($this);

                $this->lblOrgCreateBy = $this->mctRecord->lblCreateBy_Create();
                $this->lblOrgCreateBy->Name = QApplication::Translate("Organization: Created By");

                $this->lblOrgCreateDate = $this->mctRecord->lblCreateDate_Create( null,QDateTime::FormatDisplayDateTimeFull );
                $this->lblOrgCreateDate->Name = QApplication::Translate("Organization: Created Date");

                $this->lblOrgUpdateBy = $this->mctRecord->lblUpdateBy_Create();
                $this->lblOrgUpdateBy->Name = QApplication::Translate("Organization: Update By");

                $this->lblOrgUpdateDate = $this->mctRecord->lblUpdateDate_Create(null,QDateTime::FormatDisplayDateTimeFull );
                $this->lblOrgUpdateDate->Name = QApplication::Translate("Organization: Update Date");


                $this->mctAddress= $mctAddress;
                $objAddress = $this->mctAddress->__get('Address');
                $this->mctRecord = RecordMetaControl::Create($this, $objAddress->__get("RecordId") );

                $this->lblAddressId = $this->mctAddress->lblId_Create();
                $this->lblAddressId->Name = QApplication::Translate("Address: Id");
                $this->lblAddressId->SetParentControl($this);

                $this->lblAddressCreateBy = $this->mctRecord->lblCreateBy_Create();
                $this->lblAddressCreateBy->Name = QApplication::Translate("Address: Created By");

                $this->lblAddressCreateDate = $this->mctRecord->lblCreateDate_Create(null,QDateTime::FormatDisplayDateTimeFull );
                $this->lblAddressCreateDate->Name = QApplication::Translate("Address: Created Date");

                $this->lblAddressUpdateBy = $this->mctRecord->lblUpdateBy_Create();
                $this->lblAddressUpdateBy->Name = QApplication::Translate("Address: Update By");

                $this->lblAddressUpdateDate = $this->mctRecord->lblUpdateDate_Create(null,QDateTime::FormatDisplayDateTimeFull );
                $this->lblAddressUpdateDate->Name = QApplication::Translate("Address: Update Date");
            }

    public function Validate() {
        $blnToReturn = true;


        return $blnToReturn;
    }




}
?>


